|
@@ -62,7 +62,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="出库商品" prop="reduceProductId" v-if="reduceFlag" >
|
|
|
<el-select v-model="formData.data.reduceProductId" filterable :disabled="reduceProductIdDisplay" style="width: 100%;">
|
|
|
- <el-option v-for="item in productList" :key="item.value" :label="item.label" :value="item.value"/>
|
|
|
+ <el-option v-for="item in reduceProductList" :key="item.value" :label="item.label" :value="item.value"/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="出库商品数量" prop="reduceQuantity" v-if="reduceFlag">
|
|
@@ -77,7 +77,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="入库商品" prop="addProductId" v-if="addFlag">
|
|
|
<el-select v-model="formData.data.addProductId" filterable style="width: 100%;" :disabled="addProductIdDisplay">
|
|
|
- <el-option v-for="item in productList" :key="item.value" :label="item.label" :value="item.value"/>
|
|
|
+ <el-option v-for="item in addProductList" :key="item.value" :label="item.label" :value="item.value"/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="入库商品数量" prop="addQuantity" v-if="addFlag" >
|
|
@@ -146,8 +146,8 @@ const sourceList = ref({
|
|
|
});
|
|
|
|
|
|
const warehouseList = ref([])
|
|
|
-// const reduceProductList = ref([])
|
|
|
-// const addProductList = ref([])
|
|
|
+const reduceProductList = ref([])
|
|
|
+const addProductList = ref([])
|
|
|
const productList = ref([])
|
|
|
|
|
|
|
|
@@ -416,30 +416,19 @@ const config = computed(() => {
|
|
|
},
|
|
|
renderHTML(row) {
|
|
|
return [
|
|
|
- row.handleStatus !== '2'
|
|
|
+ !isNullOrUndefined(row.productName)
|
|
|
? {
|
|
|
attrs: {
|
|
|
- label: "处理",
|
|
|
+ label: row.handleStatus == '1'?"处理":"详情",
|
|
|
type: "danger",
|
|
|
text: true,
|
|
|
},
|
|
|
el: "button",
|
|
|
click() {
|
|
|
- openHandleAction(row,false);
|
|
|
+ openHandleAction(row, row.handleStatus == '1'?false:true);
|
|
|
},
|
|
|
}
|
|
|
- : {
|
|
|
- attrs: {
|
|
|
- label: "详情",
|
|
|
- type: "danger",
|
|
|
- text: true,
|
|
|
- },
|
|
|
- el: "button",
|
|
|
- click() {
|
|
|
- openHandleAction(row,true);
|
|
|
- },
|
|
|
-
|
|
|
- },
|
|
|
+ : {},
|
|
|
];
|
|
|
},
|
|
|
},
|
|
@@ -590,9 +579,6 @@ const openHandleAction = (row,isView) => {
|
|
|
//处理方案
|
|
|
treeChangeSelect(formData.data.abnormalStatus)
|
|
|
|
|
|
- addProductIdDisplay.value = true
|
|
|
- reduceProductIdDisplay.value = true
|
|
|
-
|
|
|
|
|
|
formData.data.absoluteValue = absoluteValue
|
|
|
|
|
@@ -648,7 +634,10 @@ const next = async () => {
|
|
|
|
|
|
intiFlag()
|
|
|
|
|
|
-
|
|
|
+ if (isViewFlag.value){
|
|
|
+ reduceProductIdDisplay.value = true
|
|
|
+ addProductIdDisplay.value = true
|
|
|
+ }
|
|
|
|
|
|
|
|
|
//判断 出库
|
|
@@ -661,6 +650,37 @@ const next = async () => {
|
|
|
if (['101','402','403'].indexOf(type)>-1){
|
|
|
formData.data.reduceProductId = formData.data.productId
|
|
|
reduceProductIdDisplay.value = true
|
|
|
+
|
|
|
+ proxy.post("/jdOrderEx/productInfoById", { productId: formData.data.productId}).then((res) => {
|
|
|
+ console.log("reduceProductList",res)
|
|
|
+ console.log("reduceProductList",res.data)
|
|
|
+ if (res && res.length > 0) {
|
|
|
+ reduceProductList.value = res.map((item) => {
|
|
|
+ return {
|
|
|
+ label: item.name,
|
|
|
+ value: item.id,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ addProductList.value = productList.value
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ if (['101','402','403'].indexOf(type)>-1){
|
|
|
+
|
|
|
+ proxy.post("/jdOrderEx/productInfoById", { productId: formData.data.productId}).then((res) => {
|
|
|
+ console.log("reduceProductList",res)
|
|
|
+ console.log("reduceProductList",res.data)
|
|
|
+ if (res && res.length > 0) {
|
|
|
+ reduceProductList.value = res.map((item) => {
|
|
|
+ return {
|
|
|
+ label: item.name,
|
|
|
+ value: item.id,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ addProductList.value = productList.value
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -677,9 +697,41 @@ const next = async () => {
|
|
|
if (['301', '401',,'501'].indexOf(type) > -1) {
|
|
|
formData.data.addProductId = formData.data.productId
|
|
|
addProductIdDisplay.value = true
|
|
|
+
|
|
|
+
|
|
|
+ proxy.post("/jdOrderEx/productInfoById", { productId: formData.data.productId }).then((res) => {
|
|
|
+ if (res && res.length > 0) {
|
|
|
+ addProductList.value = res.map((item) => {
|
|
|
+ return {
|
|
|
+ label: item.name,
|
|
|
+ value: item.id,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ reduceProductList.value = productList.value
|
|
|
}
|
|
|
+ }else {
|
|
|
+ if (['301', '401',,'501'].indexOf(type) > -1) {
|
|
|
+ addProductIdDisplay.value = true
|
|
|
+ proxy.post("/jdOrderEx/productInfoById", { productId: formData.data.productId }).then((res) => {
|
|
|
+ if (res && res.length > 0) {
|
|
|
+ addProductList.value = res.map((item) => {
|
|
|
+ return {
|
|
|
+ label: item.name,
|
|
|
+ value: item.id,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ reduceProductList.value = productList.value
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
+
|
|
|
//判断 备注
|
|
|
if (['201','203','403','503'].indexOf(type)>-1){
|
|
|
remarkFlag.value = true
|