- 选择设备
+ 添加设备
- {{v[0]}} * {{v[1]}}条
+ {{ v[0] }} * {{ v[1] }}条
-
-
-
-
- 生成
-
- {{scope.row.deviceCode}}
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- {{scope.row.batchNo}}
-
-
-
-
-
-
- {{scope.row.serialNo}}
-
-
-
-
-
-
- {{scope.row.productionDate}}
-
-
-
-
-
-
- {{scope.row.expireDate}}
-
-
-
-
-
-
- {{scope.row.udi}}
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- 保存
- 编辑
+ 编辑
+
+
+
+
+
+ 复制
+
删除
- 复制
- 批量
+
+
+
+
@@ -289,7 +316,7 @@
v-if="chooseDeviceFlag"
@close="chooseDeviceFlag = false"
>
-
+
@@ -298,8 +325,25 @@
v-if="chooseProductFlag"
@close="chooseProductFlag = false"
>
-
+
+
+
+
+
+
diff --git a/src/views/dev/js/deviceChangeOrder.js b/src/views/dev/js/deviceChangeOrder.js
index 66cb6e15..b2720a54 100644
--- a/src/views/dev/js/deviceChangeOrder.js
+++ b/src/views/dev/js/deviceChangeOrder.js
@@ -2,15 +2,16 @@ import {
cancelChangeOrder,
changeOrderDetailByUser,
changeOrderPage,
- confirmChangeOrder, rejectChangeOrder, saveChangeOrder
+ confirmChangeOrder, delDraftOrder, rejectChangeOrder, saveChangeOrder, saveDraftOrder
} from "@/api/dev/deviceChangeOrderApi";
import {deviceChangeStatus, deviceChangeType} from "@/utils/enum";
import "@/store/getters";
import {genDeviceCode} from "@/api/dev/deviceInfoApi";
import deviceInfo from "@/views/dev/deviceInfo.vue";
-import product from "@/views/basic/product/product.vue";
+import product from "@/views/purchase/purApply/purOrderSelectProduct";
import {copyProperties} from "@/utils";
-
+import deviceModifyDialog from "@/views/dev/devInfoEdit.vue";
+import fa from "element-ui/src/locale/lang/fa";
let query = {
page: 1,
@@ -59,7 +60,7 @@ export default {
required: true,
}
},
- components: {deviceInfo, product},
+ components: {deviceInfo, product, deviceModifyDialog},
computed: {
deviceChangeStatus() {
return deviceChangeStatus
@@ -106,14 +107,28 @@ export default {
},
chooseDeviceFlag: false,
chooseProductFlag: false,
+ deviceInfoFlag: false,
+ createTitle: "设备入库",
+ curDevRow: null,
//==================================================
+
}
},
created() {
+
let adminId = this.$store.getters.adminId
this.cacheKey = "deviceChangeOrder" + this.type.key + adminId
this.locDeptCode = this.$store.getters.locDeptCode
this.locDeptName = this.$store.getters.locDeptName
+
+ if (this.type == deviceChangeType.ADD) {
+ this.createTitle = "设备入库";
+ } else if (this.type == deviceChangeType.CHANGE) {
+ this.createTitle = "设备变更";
+ } else if (this.type == deviceChangeType.DESTROY) {
+ this.createTitle = "设备报废";
+ }
+
this.getList()
},
watch: {
@@ -138,30 +153,53 @@ export default {
},
methods: {
saveCache() {
- let data = window.localStorage.getItem(this.cacheKey)
- if (data == null) {
- data = {
- createActive: this.createActive,
- createData: this.createData,
- itemList: this.itemList
+ // let data = window.localStorage.getItem(this.cacheKey)
+ // if (data == null) {
+ // data = {
+ // createActive: this.createActive,
+ // createData: this.createData,
+ // itemList: this.itemList
+ // }
+ // window.localStorage.setItem(this.cacheKey, JSON.stringify(data))
+ // this.showCreateDialog = false
+ // } else {
+ // this.$confirm("检测到已经挂起了一单,如继续挂起将会覆盖之前的单,是否继续", "提示", {
+ // confirmButtonText: "继续",
+ // cancelButtonText: "取消",
+ // type: "warning",
+ // }).then(() => {
+ // data = {
+ // createActive: this.createActive,
+ // createData: this.createData,
+ // itemList: this.itemList
+ // }
+ // window.localStorage.setItem(this.cacheKey, JSON.stringify(data))
+ // this.showCreateDialog = false
+ // })
+ // }
+
+
+ this.createData.items = this.itemList
+ let loading = this.$loading({
+ lock: true,
+ text: 'Loading',
+ spinner: 'el-icon-loading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ });
+ saveDraftOrder(this.createData).then(res => {
+ loading.close()
+ if (res.code != 20000) {
+ this.$message.error(res.message)
+ return
}
- window.localStorage.setItem(this.cacheKey, JSON.stringify(data))
+ this.$message.success(res.message)
this.showCreateDialog = false
- } else {
- this.$confirm("检测到已经挂起了一单,如继续挂起将会覆盖之前的单,是否继续", "提示", {
- confirmButtonText: "继续",
- cancelButtonText: "取消",
- type: "warning",
- }).then(() => {
- data = {
- createActive: this.createActive,
- createData: this.createData,
- itemList: this.itemList
- }
- window.localStorage.setItem(this.cacheKey, JSON.stringify(data))
- this.showCreateDialog = false
- })
- }
+ this.query = {...query}
+ this.getList()
+ }).catch(() => {
+ loading.close()
+ })
+
},
saveForm() {
if (this.itemList.length == 0) {
@@ -211,9 +249,23 @@ export default {
loading.close()
})
},
+ //移除设备
delDeviceRow(index) {
this.itemList.splice(index, 1)
},
+
+ //编辑设备
+ editDeviceRow(row) {
+ this.curDevRow = row;
+ this.deviceInfoFlag = true;
+ },
+
+ //设备编辑保存
+ editSaveDev() {
+ // this.curDevRow = row;
+ this.deviceInfoFlag = false;
+ },
+
copyRow(index) {
let data = {
...this.itemList[index],
@@ -302,6 +354,7 @@ export default {
})
},
openChoose(index) {
+
if (this.createData.type == deviceChangeType.ADD.key) {
this.chooseProductFlag = true
} else {
@@ -330,20 +383,23 @@ export default {
}
return true
},
- chooseProduct(row) {
+ chooseProduct(lists) {
let loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
- let data = copyProperties(row, item)
- data.editFlag = true
- this.genCode(data)
- data.productName = row.cpmctymc
- data.productId = row.id
- this.itemList.push(data)
- loading.close()
+ for (let row of lists) {
+ let data = copyProperties(row, item)
+ data.editFlag = true
+ this.genCode(data)
+ data.productName = row.cpmctymc
+ data.productId = row.id
+ this.itemList.push(data)
+ loading.close()
+
+ }
this.chooseProductFlag = false
},
parseItemMap() {
@@ -407,6 +463,9 @@ export default {
window.localStorage.removeItem(this.cacheKey)
}
},
+ /**
+ * 创建单据
+ */
openCreate() {
this.fullScreenFlag = false
this.createData = {...createData, type: this.type.key}
@@ -415,6 +474,46 @@ export default {
this.itemList = []
this.showCreateDialog = true
},
+
+ /**
+ * 编辑单据
+ */
+ openEdit(row) {
+ this.fullScreenFlag = false
+ // this.createData = {...createData, type: this.type.key}
+
+ this.createData = row
+ this.createActive = 0
+ this.oldType = null
+ this.itemList = []
+ this.showCreateDialog = true
+ this.getDetailList()
+ },
+
+ /**
+ * 删除单据
+ * @param row
+ */
+ delOrder(row) {
+ this.$confirm("确定删除该单据?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(() => {
+ delDraftOrder({"orderId": row.orderId}).then(res => {
+ if (res.code != 20000) {
+ this.$message.error(res.message)
+ return
+ }
+ this.$message.success(res.message)
+ this.query.page = 1
+ this.getList()
+ this.clickRow = null
+ })
+ })
+
+ },
+
confirm(row) {
this.$prompt('请输入备注信息', '提示', {
confirmButtonText: '确定',
@@ -499,6 +598,7 @@ export default {
}
this.detailList = res.data.list || []
this.detailTotal = res.data.total || 0
+ this.itemList = this.detailList
}).catch(e => {
this.detailLoading = false
})
diff --git a/src/views/inout/PanelSkPrescribeDi.vue b/src/views/inout/PanelSkPrescribeDi.vue
index c1b8de84..a0cebc81 100644
--- a/src/views/inout/PanelSkPrescribeDi.vue
+++ b/src/views/inout/PanelSkPrescribeDi.vue
@@ -98,7 +98,6 @@ export default {
},
methods: {
getList() {
- debugger
this.loading = true;
this.filterQuery.adNum = this.sickerAdNum;
this.filterQuery.billNo = this.perscribeData.billNo;
diff --git a/src/views/inout/stat/DialogCreateCustom.vue b/src/views/inout/stat/DialogCreateCustom.vue
index 41a75a89..e64416ae 100644
--- a/src/views/inout/stat/DialogCreateCustom.vue
+++ b/src/views/inout/stat/DialogCreateCustom.vue
@@ -170,7 +170,6 @@ export default {
return true;
},
formSubmit() {
- debugger
this.$refs["dataForm"].validate((valid) => {
if (valid) {
this.formLoading = true;
diff --git a/src/views/purchase/purApply/purOrderSelectProduct.vue b/src/views/purchase/purApply/purOrderSelectProduct.vue
index 90611736..db00d5c5 100644
--- a/src/views/purchase/purApply/purOrderSelectProduct.vue
+++ b/src/views/purchase/purApply/purOrderSelectProduct.vue
@@ -4,7 +4,7 @@