Browse Source

修改包件物料修改

master
caoyizhong 1 year ago
parent
commit
a8208973ea
  1. 37
      src/views/distribution/inventory/distributionStockArticleDetails.vue

37
src/views/distribution/inventory/distributionStockArticleDetails.vue

@ -106,7 +106,7 @@
<h3>包件信息</h3> <h3>包件信息</h3>
<div class="plck"> <div class="plck">
<el-button type="primary" @click="allhandleQRCode">批量查看二维码</el-button> <el-button type="primary" @click="allhandleQRCode">批量查看二维码</el-button>
<el-button v-if="dataMaterial" type="primary" @click="handleMaterialList()" <el-button type="primary" @click="handleMaterialList()"
>补充物料信息</el-button >补充物料信息</el-button
> >
</div> </div>
@ -144,9 +144,17 @@
text text
icon="el-icon-view" icon="el-icon-view"
v-if="!slotProps.scope.row.materialId" v-if="!slotProps.scope.row.materialId"
@click="handleMaterial(slotProps.scope.row)" @click="handleMaterial(slotProps.scope.row,'1')"
>补充物料信息</el-text >补充物料信息</el-text
> >
<el-text
type="primary"
text
icon="el-icon-view"
v-if="slotProps.scope.row.materialId"
@click="handleMaterial(slotProps.scope.row,'2')"
>修改物料信息</el-text
>
</template> </template>
</tablecmt> </tablecmt>
@ -1226,11 +1234,28 @@ export default {
this.form = res.data.data; this.form = res.data.data;
}); });
}, },
handleMaterial(row) { async handleMaterial(row,index) {
console.log('row>>>', row); // console.log('row>>>', row);
this.titleMaterial = '补充物料'; if(index === "2"){
this.titleMaterial = '修改物料';
this.formMaterial = row;
this.loading = true;
getListMaterial(this.page.currentPage, this.page.pageSize, {
productCode: row.materialCode,
}).then(res =>{
// console.log('', res.data.data.records[0].sku);
this.formMaterial.sku = res.data.data.records[0].sku;
});
this.loading = false;
this.optionsName = [{id: row.materialId,name: row.materialName}]
this.optionsCode = [{id: row.materialId,productCode: row.materialCode}]
// console.log("333333",this.optionsCode[0]);
}else{
this.titleMaterial = '补充物料';
this.formMaterial.id = row.id;
}
this.materialBox = true; this.materialBox = true;
this.formMaterial.id = row.id; console.log("_+_+_+_+_+_+_",index);
}, },
allhandleQRCode() { allhandleQRCode() {
console.log(this.selectionList); console.log(this.selectionList);

Loading…
Cancel
Save