This commit is contained in:
2022-12-05 17:30:38 +08:00
parent f8144305f2
commit 30f864d37b
4 changed files with 238 additions and 151 deletions

View File

@@ -128,7 +128,54 @@
/>
</el-form-item>
</el-form>
<el-card class="box-card" shadow="never" :body-style="{padding:'20px 20px 0 20px'}" style="margin-top: 5px;">
<el-form ref="form2" :inline="true" :model="form" :rules="rules" size="mini">
<el-form-item label="销售订单-" prop="new_sale_order_name">
<el-input v-model="form.new_sale_order_name" class="input-with-select"/>
</el-form-item>
<el-form-item label="客户编码-" prop="new_sale_order_name">
<el-input v-model="form.new_customer_name" class="input-with-select"/>
</el-form-item>
<el-form-item label="客户描述-" prop="form.new_sale_order_name">
<el-input v-model="form.new_customer_description" class="input-with-select"/>
</el-form-item>
<el-form-item label="交货日期-" prop="demand_date">
<el-date-picker
v-model="form.demand_date"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item label="制造日期-" prop="date_of_fg_inbound">
<el-date-picker
v-model="form.date_of_fg_inbound"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item label="更换外包装标签" prop="isreprintpackageboxlabel">
<el-switch
v-model="form.isreprintpackageboxlabel"
active-value="1"
inactive-value="0"
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
</el-form-item>
<el-form-item label="更换子卷标签" prop="isunpackbox">
<el-switch
v-model="form.isunpackbox"
active-value="1"
inactive-value="0"
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
</el-form-item>
</el-form>
<el-button class="filter-item" @click="allSend()" size="medium" icon="el-icon-plus" style="float: right; padding: 3px 0" type="warning">一键填充</el-button>
</el-card>
<div class="crud-opts2">
<span class="role-span">变更明细</span>
<span v-if="crud.status.cu > 0" class="crud-opts-right2">
@@ -299,6 +346,10 @@ const defaultForm = {
remark: '',
biz_date: new Date(),
create_mode: '',
demand_date: '',
new_customer_description: '',
new_customer_name: '',
new_sale_order_name: '',
tableData: []
}
export default {
@@ -461,6 +512,23 @@ export default {
this.storId = this.form.stor_id
this.dtlShow = true
},
allSend() {
if (this.form.tableData.length === 0) {
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
for (let i = 0; i < this.form.tableData.length; i++) {
this.$set(this.form.tableData[i], 'new_sale_order_name', this.form.new_sale_order_name)
this.$set(this.form.tableData[i], 'new_customer_name', this.form.new_customer_name)
this.$set(this.form.tableData[i], 'new_customer_description', this.form.new_customer_description)
this.$set(this.form.tableData[i], 'demand_date', this.form.demand_date)
this.$set(this.form.tableData[i], 'date_of_fg_inbound', this.form.date_of_fg_inbound)
this.$set(this.form.tableData[i], 'isunpackbox', this.form.isunpackbox)
this.$set(this.form.tableData[i], 'isreprintpackageboxlabel', this.form.isreprintpackageboxlabel)
this.form.tableData.splice(i, 1, this.form.tableData[i]) // 通过splice 替换数据 触发视图更新
}
},
async queryStruct(index, row) {
this.structShow = true
this.$refs.child.getMsg(false)
@@ -564,12 +632,12 @@ export default {
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
for (let i = 0; i < this.form.tableData.length; i++) {
/* for (let i = 0; i < this.form.tableData.length; i++) {
if (!this.form.tableData[i].edit) {
this.crud.notify('尚有未完成编辑的物料明细序号' + (i + 1) + ',请检查!')
return false
}
}
}*/
}
}
}

View File

@@ -106,7 +106,7 @@
@current-change="handleDtlCurrentChange"
>
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column prop="bill_code" label="出库单号" align="center" width="100"/>
<el-table-column prop="bill_code" label="出库单号" align="center" width="120"/>
<el-table-column :formatter="bill_statusFormat" prop="bill_status" label="状态" />
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />