|
@@ -593,17 +593,17 @@
|
|
|
</el-form>
|
|
|
|
|
|
<div class="btn_group">
|
|
|
- <!-- <el-col :span="1.5">
|
|
|
- <el-button type="primary" size="mini" plain @click="copy" v-if="sonPageStu == 'check'">复制</el-button>
|
|
|
- </el-col> -->
|
|
|
<el-col :span="1.5">
|
|
|
- <el-button type="danger" size="mini" plain @click="toNC" v-if="sonPageStu == 'check' && row.status == '2'">重传NC</el-button>
|
|
|
+ <el-button style="margin-right: 10px;" type="primary" size="mini" plain @click="copy" v-if="sonPageStu == 'check'">复制</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
- <el-button type="primary" size="mini" plain @click="save" v-if="sonPageStu == 'add' || sonPageStu == 'edit'">保存</el-button>
|
|
|
+ <el-button style="margin-right: 10px;" type="danger" size="mini" plain @click="toNC" v-if="sonPageStu == 'check' && row.status == '2'">重传NC</el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="1.5" style="margin: 0 10px;">
|
|
|
- <el-button type="primary" size="mini" plain @click="submit" v-if="sonPageStu == 'check' && (row.status == '0' || row.status == '3')">提交</el-button>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button style="margin-right: 10px;" type="primary" size="mini" plain @click="save" v-if="sonPageStu == 'add' || sonPageStu == 'edit'">保存</el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button style="margin-right: 10px;" type="primary" size="mini" plain @click="submit" v-if="sonPageStu == 'check' && (row.status == '0' || row.status == '3')">提交</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button size="mini" plain @click="back">返回</el-button>
|
|
@@ -793,7 +793,56 @@ export default {
|
|
|
scope.row.mainQty = scope.row.qty
|
|
|
},
|
|
|
copy() {
|
|
|
-
|
|
|
+ this.$modal.msgSuccess("复制成功");
|
|
|
+ this.sonPageStu = 'add'
|
|
|
+ this.sonDisable = false
|
|
|
+ this.getDetails(this.row)
|
|
|
+ this.basicForm.id = ''
|
|
|
+ this.basicForm.code = ''
|
|
|
+ this.basicForm.createByName = ''
|
|
|
+ this.basicForm.createBy = ''
|
|
|
+ this.basicForm.createTime = ''
|
|
|
+ this.basicForm.isSendWms = ''
|
|
|
+ this.basicForm.ncCode = ''
|
|
|
+ this.basicForm.oaId = ''
|
|
|
+ this.basicForm.updateBy = ''
|
|
|
+ this.basicForm.updateByName = ''
|
|
|
+ this.basicForm.updateTime = ''
|
|
|
+ },
|
|
|
+ handleData() {
|
|
|
+ console.log('222')
|
|
|
+ // 复制新增把id,编码,创建人置为空,子表去掉id
|
|
|
+ this.basicForm.id = ''
|
|
|
+ this.basicForm.code = ''
|
|
|
+ this.basicForm.createBy = ''
|
|
|
+ this.basicForm.createByName = ''
|
|
|
+ this.basicForm.createTime = ''
|
|
|
+ this.basicForm.isSendWms = ''
|
|
|
+ this.basicForm.ncCode = ''
|
|
|
+ this.basicForm.oaId = ''
|
|
|
+ this.basicForm.updateBy = ''
|
|
|
+ this.basicForm.updateByName = ''
|
|
|
+ this.basicForm.updateTime = ''
|
|
|
+ if (this.materialInfo.length !== 0) {
|
|
|
+ this.materialInfo.forEach(item => {
|
|
|
+ if (item.allotId) {
|
|
|
+ delete item.allotId
|
|
|
+ }
|
|
|
+ if (item.id) {
|
|
|
+ delete item.id
|
|
|
+ }
|
|
|
+ if (item.createBy) {
|
|
|
+ delete item.createBy
|
|
|
+ delete item.createByName
|
|
|
+ delete item.createTime
|
|
|
+ }
|
|
|
+ if (item.updateBy) {
|
|
|
+ delete item.updateBy
|
|
|
+ delete item.updateByName
|
|
|
+ delete item.updateTime
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
toNC() {
|
|
|
againToNC(this.row).then(res => {
|
|
@@ -818,7 +867,8 @@ export default {
|
|
|
},
|
|
|
save() {
|
|
|
if(this.materialInfo.length !== 0) {
|
|
|
- if(this.pageStu == 'add') {
|
|
|
+ if(this.sonPageStu == 'add') {
|
|
|
+ this.handleData()
|
|
|
this.basicForm.stAllotMaterialList = this.materialInfo
|
|
|
this.basicForm.stAllotReceiveDeliverList = this.receiveInfo
|
|
|
this.basicForm.stAllotReceiveExecuteList = this.priceList
|
|
@@ -834,7 +884,7 @@ export default {
|
|
|
this.$emit('refresh', queryParams)
|
|
|
}
|
|
|
})
|
|
|
- } else if (this.pageStu == 'edit') {
|
|
|
+ } else if (this.sonPageStu == 'edit') {
|
|
|
this.basicForm.stAllotMaterialList = this.materialInfo
|
|
|
this.basicForm.stAllotReceiveDeliverList = this.receiveInfo
|
|
|
this.basicForm.stAllotReceiveExecuteList = this.priceList
|