diff --git a/api/app/lib/models/patrol_record_issue_handle.js b/api/app/lib/models/patrol_record_issue_handle.js
index c0a73ca..f2926ab 100644
--- a/api/app/lib/models/patrol_record_issue_handle.js
+++ b/api/app/lib/models/patrol_record_issue_handle.js
@@ -204,6 +204,15 @@ module.exports = dc => {
field: "isgaojing",
autoIncrement: false
},
+ cost: {
+ type: DataTypes.DECIMAL(11, 2),
+ allowNull: true,
+ defaultValue: null,
+ comment: '成本',
+ primaryKey: false,
+ field: "cost",
+ autoIncrement: false
+ },
}, {
tableName: "patrol_record_issue_handle",
comment: "",
diff --git a/script/1.0.5/schema/3.update_patrol_record_issue_handle.sql b/script/1.0.5/schema/3.update_patrol_record_issue_handle.sql
new file mode 100644
index 0000000..8f1541a
--- /dev/null
+++ b/script/1.0.5/schema/3.update_patrol_record_issue_handle.sql
@@ -0,0 +1,4 @@
+ALTER TABLE "public"."patrol_record_issue_handle"
+ ADD COLUMN "cost" decimal(11,2);
+
+COMMENT ON COLUMN "public"."patrol_record_issue_handle"."cost" IS '成本';
\ No newline at end of file
diff --git a/weapp/package/troubleshooting/shootingForm/index.js b/weapp/package/troubleshooting/shootingForm/index.js
index d884f77..c75beda 100644
--- a/weapp/package/troubleshooting/shootingForm/index.js
+++ b/weapp/package/troubleshooting/shootingForm/index.js
@@ -34,6 +34,7 @@ Page({
repair: '',
repairImgs: [],
checkDesc: '',
+ cost: '',
checkImgs: [],
// 表单控制
@@ -124,6 +125,7 @@ Page({
if (issue.state > 4) {
this.setData({
checkDesc: issue.checkOpinion,
+ cost: issue.cost,
checkImgs: issue.checkImage || [],
})
}
@@ -198,8 +200,16 @@ Page({
},
onInputChange (e) {
+ let value = e.detail.value
+ if (e.target.dataset.type === 'cost' && !/^(\d?)+(\.\d{0,2})?$/.test(e.detail.value)) {
+ wx.showToast({
+ title: '只能输入两位小数',
+ icon: 'none'
+ })
+ value = value.substring(0, value.length - 1);
+ }
this.setData({
- [e.target.dataset.type]: e.detail.value
+ [e.target.dataset.type]: value
})
},
@@ -322,7 +332,7 @@ Page({
maintenancePersonIndex, maintenancePersonDepartmentShow, qualityPersonIndex, planStartTime, planEndTime, planStartTimeShow, planEndTimeShow, maintenanceRequirement,
userInfo, planApproval,
repair, repairImgs,
- checkDesc, checkImgs
+ checkDesc, cost, checkImgs
} = this.data
let nextState = ''
let confirmData = {}
@@ -372,6 +382,7 @@ Page({
confirmData = {
...confirmData,
checkOpinion: checkDesc,
+ cost,
checkImage: checkImgs,
checkPerson: { id: userInfo.id, name: userInfo.name }
}
diff --git a/weapp/package/troubleshooting/shootingForm/index.wxml b/weapp/package/troubleshooting/shootingForm/index.wxml
index d946ee3..3d7ce23 100644
--- a/weapp/package/troubleshooting/shootingForm/index.wxml
+++ b/weapp/package/troubleshooting/shootingForm/index.wxml
@@ -137,6 +137,7 @@
质检验收
+
现场图片
diff --git a/web/client/src/sections/issueHandle/components/isuue-handle-mdal.js b/web/client/src/sections/issueHandle/components/isuue-handle-mdal.js
index 0b799b6..94c5762 100644
--- a/web/client/src/sections/issueHandle/components/isuue-handle-mdal.js
+++ b/web/client/src/sections/issueHandle/components/isuue-handle-mdal.js
@@ -178,6 +178,13 @@ export default (props) => {
value={editData?.patrolRecordIssueHandles[0]?.checkPerson?.name}
/>
+
+