|
@@ -237,6 +237,7 @@
|
|
|
prop="fCorpid"
|
|
|
/>
|
|
|
<el-table-column label="提单号" align="center" prop="fMblno" />
|
|
|
+ <el-table-column label="品名" :show-overflow-tooltip="true" align="ceter" prop="fProductName" />
|
|
|
<el-table-column label="品牌" align="center" prop="fMarks" />
|
|
|
<el-table-column
|
|
|
label="出库日期"
|
|
@@ -555,11 +556,21 @@
|
|
|
<el-input
|
|
|
v-model="form.fMarks"
|
|
|
style="width: 80%"
|
|
|
- :disabled="browseStatus || formBrowseStatus"
|
|
|
+ disabled
|
|
|
placeholder="品牌"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="品名" prop="fProductName">
|
|
|
+ <el-input
|
|
|
+ v-model="form.fProductName"
|
|
|
+ style="width: 80%"
|
|
|
+ disabled
|
|
|
+ placeholder="品名"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-form-item label="备注" prop="remark">
|
|
@@ -2197,6 +2208,7 @@ import {
|
|
|
updateWarehousebills,
|
|
|
exportWarehousebills,
|
|
|
} from "@/api/warehouseBusiness/warehouseOutStock";
|
|
|
+
|
|
|
import { listAgreement, operationAgreement } from "@/api/agreement/agreement";
|
|
|
|
|
|
import { listAgreements } from "@/api/warehouseBusiness/agreement";
|
|
@@ -2470,7 +2482,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
//关闭弹框的事件
|
|
|
- addCloseDialog(){
|
|
|
+ addCloseDialog(){
|
|
|
this.getList()
|
|
|
},
|
|
|
// 上传成功返回数据
|
|
@@ -3517,8 +3529,23 @@ export default {
|
|
|
this.fCntrtype = selection[0].fCntrtype
|
|
|
this.fGoodsids = selection[0].fGoodsids
|
|
|
},
|
|
|
+ // 更新主表品名并去重
|
|
|
+ updateDeduplication: function() {
|
|
|
+ if (this.dataList.length === 0) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ let fMarks = []
|
|
|
+ let fGoodsid = []
|
|
|
+ for (let li in this.dataList) {
|
|
|
+ fMarks.push(this.dataList[li].fMarks)
|
|
|
+ fGoodsid.push(this.dataList[li].fGoodsids)
|
|
|
+ }
|
|
|
+ this.$set(this.form, 'fMarks', Array.from(new Set(fMarks)).join(","))
|
|
|
+ this.$set(this.form, 'fProductName', Array.from(new Set(fGoodsid)).join(","))
|
|
|
+ },
|
|
|
// 保存
|
|
|
saveForm () {
|
|
|
+ this.updateDeduplication()
|
|
|
this.$refs['form'].validate((valid) => {
|
|
|
if (this.dataList.length === 0) {
|
|
|
this.$message.error('请添加库存明细!')
|
|
@@ -3539,30 +3566,33 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
if (valid) {
|
|
|
- this.form.fBillstatus = 2
|
|
|
- let formData = new window.FormData()
|
|
|
- formData.append("warehouseBills", JSON.stringify(this.form));
|
|
|
- formData.append("warehousebillsitems", JSON.stringify(this.dataList));
|
|
|
- formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
|
|
|
- formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
|
|
|
- formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
|
|
|
- addWarehousebills(formData).then((response) => {
|
|
|
- this.msgSuccess('保存成功')
|
|
|
- this.form = response.data.warehouseBills
|
|
|
- this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
|
|
|
- this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
|
|
|
- this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
|
|
|
- this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
|
|
|
- this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
|
|
|
- this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
|
|
|
- this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
|
|
|
- this.dataList = response.data.warehousebillsitems
|
|
|
- })
|
|
|
+ setTimeout(() => {
|
|
|
+ this.form.fBillstatus = 2
|
|
|
+ let formData = new window.FormData()
|
|
|
+ formData.append("warehouseBills", JSON.stringify(this.form));
|
|
|
+ formData.append("warehousebillsitems", JSON.stringify(this.dataList));
|
|
|
+ formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
|
|
|
+ formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
|
|
|
+ formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
|
|
|
+ addWarehousebills(formData).then((response) => {
|
|
|
+ this.msgSuccess('保存成功')
|
|
|
+ this.form = response.data.warehouseBills
|
|
|
+ this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
|
|
|
+ this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
|
|
|
+ this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
|
|
|
+ this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
|
|
|
+ this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
|
|
|
+ this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
|
|
|
+ this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
|
|
|
+ this.dataList = response.data.warehousebillsitems
|
|
|
+ })
|
|
|
+ }, 200);
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
+ this.updateDeduplication()
|
|
|
this.$refs['form'].validate((valid) => {
|
|
|
if (this.dataList.length === 0) {
|
|
|
this.$message.error('请新增库存明细!')
|
|
@@ -3599,29 +3629,31 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
if (valid) {
|
|
|
- this.form.fBillstatus = status
|
|
|
- this.form.fNetweight = this.fNetweight
|
|
|
- this.form.fPlangrossweight = this.fPlangrossweight
|
|
|
- this.form.fPlannetweight = this.fPlannetweight
|
|
|
- this.form.fPlanvolumn = this.fPlanvolumn
|
|
|
- this.form.fPlanqty = this.fPlanqty
|
|
|
- this.form.fGrossweight = this.fGrossweight
|
|
|
- this.form.fQty = this.fQty
|
|
|
- if (!this.form.fId) {
|
|
|
- this.form.fId = this.fid
|
|
|
- }
|
|
|
+ setTimeout(() => {
|
|
|
+ this.form.fBillstatus = status
|
|
|
+ this.form.fNetweight = this.fNetweight
|
|
|
+ this.form.fPlangrossweight = this.fPlangrossweight
|
|
|
+ this.form.fPlannetweight = this.fPlannetweight
|
|
|
+ this.form.fPlanvolumn = this.fPlanvolumn
|
|
|
+ this.form.fPlanqty = this.fPlanqty
|
|
|
+ this.form.fGrossweight = this.fGrossweight
|
|
|
+ this.form.fQty = this.fQty
|
|
|
+ if (!this.form.fId) {
|
|
|
+ this.form.fId = this.fid
|
|
|
+ }
|
|
|
+ let formData = new window.FormData()
|
|
|
+ formData.append("warehouseBills", JSON.stringify(this.form));
|
|
|
+ formData.append("warehousebillsitems", JSON.stringify(this.dataList));
|
|
|
+ formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
|
|
|
+ formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
|
|
|
+ formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
|
|
|
+ warehouseSubmission(formData).then((response) => {
|
|
|
+ this.msgSuccess('提交成功')
|
|
|
+ this.cancel()
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
+ }, 200);
|
|
|
}
|
|
|
- let formData = new window.FormData()
|
|
|
- formData.append("warehouseBills", JSON.stringify(this.form));
|
|
|
- formData.append("warehousebillsitems", JSON.stringify(this.dataList));
|
|
|
- formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
|
|
|
- formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
|
|
|
- formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
|
|
|
- warehouseSubmission(formData).then((response) => {
|
|
|
- this.msgSuccess('提交成功')
|
|
|
- this.cancel()
|
|
|
- this.getList()
|
|
|
- })
|
|
|
})
|
|
|
},
|
|
|
/** 删除按钮操作 */
|