Commit 4b553a73b33c102b39201c7a7e99a05eada1e691

Authored by 史婷婷
1 parent e8cecdf9

feat: 7个合同-新增和初始化:sampleOrder: false

@@ -2,12 +2,13 @@ @@ -2,12 +2,13 @@
2 <project version="4"> 2 <project version="4">
3 <component name="ChangeListManager"> 3 <component name="ChangeListManager">
4 <list default="true" id="22e3db16-f3f9-44cc-b7ca-0b5f75df2820" name="Changes" comment=""> 4 <list default="true" id="22e3db16-f3f9-44cc-b7ca-0b5f75df2820" name="Changes" comment="">
5 - <change beforePath="$PROJECT_DIR$/pages/order_list/approve.vue" beforeDir="false" afterPath="$PROJECT_DIR$/pages/order_list/approve.vue" afterDir="false" />  
6 - <change beforePath="$PROJECT_DIR$/pages/order_list/detail.vue" beforeDir="false" afterPath="$PROJECT_DIR$/pages/order_list/detail.vue" afterDir="false" />  
7 - <change beforePath="$PROJECT_DIR$/pages/order_list/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/pages/order_list/index.vue" afterDir="false" />  
8 - <change beforePath="$PROJECT_DIR$/pages/order_list/modify.vue" beforeDir="false" afterPath="$PROJECT_DIR$/pages/order_list/modify.vue" afterDir="false" />  
9 - <change beforePath="$PROJECT_DIR$/pages/order_list/product.vue" beforeDir="false" afterPath="$PROJECT_DIR$/pages/order_list/product.vue" afterDir="false" />  
10 - <change beforePath="$PROJECT_DIR$/pages/order_list/viewer.vue" beforeDir="false" afterPath="$PROJECT_DIR$/pages/order_list/viewer.vue" afterDir="false" /> 5 + <change beforePath="$PROJECT_DIR$/pages/contract_foreign_std/productRel.vue" beforeDir="false" afterPath="$PROJECT_DIR$/pages/contract_foreign_std/productRel.vue" afterDir="false" />
  6 + <change beforePath="$PROJECT_DIR$/pages/contract_foreign_stock/productRel.vue" beforeDir="false" afterPath="$PROJECT_DIR$/pages/contract_foreign_stock/productRel.vue" afterDir="false" />
  7 + <change beforePath="$PROJECT_DIR$/pages/contract_foreign_unplan/productRel.vue" beforeDir="false" afterPath="$PROJECT_DIR$/pages/contract_foreign_unplan/productRel.vue" afterDir="false" />
  8 + <change beforePath="$PROJECT_DIR$/pages/contract_process/productRel.vue" beforeDir="false" afterPath="$PROJECT_DIR$/pages/contract_process/productRel.vue" afterDir="false" />
  9 + <change beforePath="$PROJECT_DIR$/pages/contract_retail/productRel.vue" beforeDir="false" afterPath="$PROJECT_DIR$/pages/contract_retail/productRel.vue" afterDir="false" />
  10 + <change beforePath="$PROJECT_DIR$/pages/contract_stock/productRel.vue" beforeDir="false" afterPath="$PROJECT_DIR$/pages/contract_stock/productRel.vue" afterDir="false" />
  11 + <change beforePath="$PROJECT_DIR$/pages/contract_unplan/productRel.vue" beforeDir="false" afterPath="$PROJECT_DIR$/pages/contract_unplan/productRel.vue" afterDir="false" />
11 </list> 12 </list>
12 <option name="SHOW_DIALOG" value="false" /> 13 <option name="SHOW_DIALOG" value="false" />
13 <option name="HIGHLIGHT_CONFLICTS" value="true" /> 14 <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -260,20 +260,20 @@ export default { @@ -260,20 +260,20 @@ export default {
260 handler(v) { 260 handler(v) {
261 // const arr = Array.isArray(v) ? v : [] 261 // const arr = Array.isArray(v) ? v : []
262 // this.items = arr.map(x => ({ ...this.defaultItem(), ...x, collapsed: true })) 262 // this.items = arr.map(x => ({ ...this.defaultItem(), ...x, collapsed: true }))
263 - this.items = v.map(x => ({ ...this.defaultItem(), ...x, collapsed: true })) 263 + this.items = v.map(x => ({ ...this.defaultItem(), ...x, sampleOrder: !!x.sampleOrder, collapsed: true }))
264 console.log('v', v) 264 console.log('v', v)
265 }, 265 },
266 deep: true 266 deep: true
267 } 267 }
268 }, 268 },
269 created() { 269 created() {
270 - const init = Array.isArray(this.list) && this.list.length > 0 ? this.list.map(v => ({ ...this.defaultItem(), ...v, collapsed: true })) : [{ ...this.defaultItem(), collapsed: false }] 270 + const init = Array.isArray(this.list) && this.list.length > 0 ? this.list.map(v => ({ ...this.defaultItem(), ...v, sampleOrder: !!v.sampleOrder, collapsed: true })) : [{ ...this.defaultItem(), collapsed: false }]
271 this.items = init 271 this.items = init
272 this.recalculateAll() 272 this.recalculateAll()
273 }, 273 },
274 methods: { 274 methods: {
275 defaultItem() { 275 defaultItem() {
276 - return { productId: '', productName: '', industry: '', brand: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '',processingFee: undefined, status: '', quantity: '', unitPrice: '', totalAmount: 0, deliveryDate: '', sampleOrder: '' } 276 + return { productId: '', productName: '', industry: '', brand: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '', status: '', quantity: '', unitPrice: '', processingFee: undefined, totalAmount: 0, deliveryDate: '', sampleOrder: false }
277 }, 277 },
278 onNonNegativeInput(idx, field) { 278 onNonNegativeInput(idx, field) {
279 const it = this.items[idx] 279 const it = this.items[idx]
@@ -238,14 +238,14 @@ export default { @@ -238,14 +238,14 @@ export default {
238 handler(v) { 238 handler(v) {
239 // const arr = Array.isArray(v) ? v : [] 239 // const arr = Array.isArray(v) ? v : []
240 // this.items = arr.map(x => ({ ...this.defaultItem(), ...x, collapsed: true })) 240 // this.items = arr.map(x => ({ ...this.defaultItem(), ...x, collapsed: true }))
241 - this.items = v.map(x => ({ ...this.defaultItem(), ...x, collapsed: true })) 241 + this.items = v.map(x => ({ ...this.defaultItem(), ...x, sampleOrder: !!x.sampleOrder, collapsed: true }))
242 console.log('v', v) 242 console.log('v', v)
243 }, 243 },
244 deep: true 244 deep: true
245 } 245 }
246 }, 246 },
247 created() { 247 created() {
248 - const init = Array.isArray(this.list) && this.list.length > 0 ? this.list.map(v => ({ ...this.defaultItem(), ...v, collapsed: true })) : [{ ...this.defaultItem(), collapsed: false }] 248 + const init = Array.isArray(this.list) && this.list.length > 0 ? this.list.map(v => ({ ...this.defaultItem(), ...v, sampleOrder: !!v.sampleOrder, collapsed: true })) : [{ ...this.defaultItem(), collapsed: false }]
249 this.items = init 249 this.items = init
250 this.recalculateAll() 250 this.recalculateAll()
251 }, 251 },
@@ -275,7 +275,7 @@ export default { @@ -275,7 +275,7 @@ export default {
275 }, 275 },
276 methods: { 276 methods: {
277 defaultItem() { 277 defaultItem() {
278 - return { productId: '', productName: '', industry: '', brand: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '', status: '', quantity: '', unitPrice: '', processingFee: undefined, totalAmount: 0, deliveryDate: '', sampleOrder: '' } 278 + return { productId: '', productName: '', industry: '', brand: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '', status: '', quantity: '', unitPrice: '', processingFee: undefined, totalAmount: 0, deliveryDate: '', sampleOrder: false }
279 }, 279 },
280 onNonNegativeInput(idx, field) { 280 onNonNegativeInput(idx, field) {
281 const it = this.items[idx] 281 const it = this.items[idx]
@@ -256,20 +256,20 @@ export default { @@ -256,20 +256,20 @@ export default {
256 handler(v) { 256 handler(v) {
257 // const arr = Array.isArray(v) ? v : [] 257 // const arr = Array.isArray(v) ? v : []
258 // this.items = arr.map(x => ({ ...this.defaultItem(), ...x, collapsed: true })) 258 // this.items = arr.map(x => ({ ...this.defaultItem(), ...x, collapsed: true }))
259 - this.items = v.map(x => ({ ...this.defaultItem(), ...x, collapsed: true })) 259 + this.items = v.map(x => ({ ...this.defaultItem(), ...x, sampleOrder: !!x.sampleOrder, collapsed: true }))
260 console.log('v', v) 260 console.log('v', v)
261 }, 261 },
262 deep: true 262 deep: true
263 } 263 }
264 }, 264 },
265 created() { 265 created() {
266 - const init = Array.isArray(this.list) && this.list.length > 0 ? this.list.map(v => ({ ...this.defaultItem(), ...v, collapsed: true })) : [{ ...this.defaultItem(), collapsed: false }] 266 + const init = Array.isArray(this.list) && this.list.length > 0 ? this.list.map(v => ({ ...this.defaultItem(), ...v, sampleOrder: !!v.sampleOrder, collapsed: true })) : [{ ...this.defaultItem(), collapsed: false }]
267 this.items = init 267 this.items = init
268 this.recalculateAll() 268 this.recalculateAll()
269 }, 269 },
270 methods: { 270 methods: {
271 defaultItem() { 271 defaultItem() {
272 - return { productId: '', productName: '', industry: '', brand: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '', status: '', quantity: '', unitPrice: '', totalAmount: 0, deliveryDate: '', sampleOrder: '' } 272 + return { productId: '', productName: '', industry: '', brand: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '', status: '', quantity: '', unitPrice: '', totalAmount: 0, deliveryDate: '', sampleOrder: false }
273 }, 273 },
274 onNonNegativeInput(idx, field) { 274 onNonNegativeInput(idx, field) {
275 const it = this.items[idx] 275 const it = this.items[idx]
@@ -298,22 +298,22 @@ export default { @@ -298,22 +298,22 @@ export default {
298 }, 298 },
299 list: { 299 list: {
300 handler(v) { 300 handler(v) {
301 - this.items = v.map(x => ({ ...this.defaultItem(), ...x, collapsed: true })) 301 + this.items = v.map(x => ({ ...this.defaultItem(), ...x, sampleOrder: !!x.sampleOrder, collapsed: true }))
302 console.log('v', v) 302 console.log('v', v)
303 }, 303 },
304 deep: true 304 deep: true
305 } 305 }
306 }, 306 },
307 created() { 307 created() {
308 - const init = Array.isArray(this.list) && this.list.length > 0 ? this.list.map(v => ({ ...this.defaultItem(), ...v, collapsed: true })) : [{ ...this.defaultItem(), collapsed: false }] 308 + const init = Array.isArray(this.list) && this.list.length > 0 ? this.list.map(v => ({ ...this.defaultItem(), ...v, sampleOrder: !!v.sampleOrder, collapsed: true })) : [{ ...this.defaultItem(), collapsed: false }]
309 this.items = init 309 this.items = init
310 console.log('init', init) 310 console.log('init', init)
311 this.recalculateAll() 311 this.recalculateAll()
312 }, 312 },
313 methods: { 313 methods: {
314 - defaultItem() {  
315 - return { productId:'', productName:'', productGrade:'', productStatus:'', rawProductId: '', rawProductName: '', rawProductGrade: '', industry: '',materialProductRatioRemarks:'', supplyTime: '存料加工', materialProductRatio: '', materialProductRatioName: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '', productQuantity: '', unitPrice: '', amountExcludingTax: 0, totalAmount: 0, deliveryDate: '', sampleOrder: '' }  
316 - }, 314 + defaultItem() {
  315 + return { rawProductId: '', rawProductName: '', rawProductGradeId: '', rawProductGradeName: '', industry: '', quality: '', supplyTime: '', materialProductRatio: '', materialProductRatioName: '', materialProductRatioRemarks: '', productName: '', productId: '', productGrade: '', productStatus: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '', productQuantity: '', unitPrice: '', amountExcludingTax: 0, totalAmount: 0, deliveryDate: '', sampleOrder: false }
  316 + },
317 onNumberInput(idx, field) { 317 onNumberInput(idx, field) {
318 const it = this.items[idx] 318 const it = this.items[idx]
319 if (!it) return 319 if (!it) return
@@ -256,19 +256,19 @@ export default { @@ -256,19 +256,19 @@ export default {
256 if (!v || !v.length) return 256 if (!v || !v.length) return
257 // Only update if significantly different to avoid loop/reset 257 // Only update if significantly different to avoid loop/reset
258 // For now, assuming external update wants to reset 258 // For now, assuming external update wants to reset
259 - this.items = v.map(x => ({ ...this.defaultItem(), ...x, collapsed: true })) 259 + this.items = v.map(x => ({ ...this.defaultItem(), ...x, sampleOrder: !!x.sampleOrder, collapsed: true }))
260 }, 260 },
261 deep: true 261 deep: true
262 } 262 }
263 }, 263 },
264 created() { 264 created() {
265 - const init = Array.isArray(this.list) && this.list.length > 0 ? this.list.map(v => ({ ...this.defaultItem(), ...v, collapsed: true })) : [{ ...this.defaultItem(), collapsed: false }] 265 + const init = Array.isArray(this.list) && this.list.length > 0 ? this.list.map(v => ({ ...this.defaultItem(), ...v, sampleOrder: !!v.sampleOrder, collapsed: true })) : [{ ...this.defaultItem(), collapsed: false }]
266 this.items = init 266 this.items = init
267 this.recalculateAll() 267 this.recalculateAll()
268 }, 268 },
269 methods: { 269 methods: {
270 defaultItem() { 270 defaultItem() {
271 - return { productId: '', productName: '', industry: '', brand: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '', status: '', quantity: '', unitPrice: '', amountExcludingTax: 0, totalAmount: 0, deliveryDate: '', sampleOrder: '' } 271 + return { productId: '', productName: '', industry: '', brand: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '', status: '', quantity: '', unitPrice: '', amountExcludingTax: 0, totalAmount: 0, deliveryDate: '', sampleOrder: false }
272 }, 272 },
273 onNumberInput(idx, field) { 273 onNumberInput(idx, field) {
274 const it = this.items[idx] 274 const it = this.items[idx]
@@ -256,14 +256,14 @@ export default { @@ -256,14 +256,14 @@ export default {
256 handler(v) { 256 handler(v) {
257 // const arr = Array.isArray(v) ? v : [] 257 // const arr = Array.isArray(v) ? v : []
258 // this.items = arr.map(x => ({ ...this.defaultItem(), ...x, collapsed: true })) 258 // this.items = arr.map(x => ({ ...this.defaultItem(), ...x, collapsed: true }))
259 - this.items = v.map(x => ({ ...this.defaultItem(), ...x, collapsed: true })) 259 + this.items = v.map(x => ({ ...this.defaultItem(), ...x, sampleOrder: !!x.sampleOrder, collapsed: true }))
260 console.log('v', v) 260 console.log('v', v)
261 }, 261 },
262 deep: true 262 deep: true
263 } 263 }
264 }, 264 },
265 created() { 265 created() {
266 - const init = Array.isArray(this.list) && this.list.length > 0 ? this.list.map(v => ({ ...this.defaultItem(), ...v, collapsed: true })) : [{ ...this.defaultItem(), collapsed: false }] 266 + const init = Array.isArray(this.list) && this.list.length > 0 ? this.list.map(v => ({ ...this.defaultItem(), ...v, sampleOrder: !!v.sampleOrder, collapsed: true })) : [{ ...this.defaultItem(), collapsed: false }]
267 this.items = init 267 this.items = init
268 this.recalculateAll() 268 this.recalculateAll()
269 }, 269 },
@@ -373,7 +373,7 @@ export default { @@ -373,7 +373,7 @@ export default {
373 return true 373 return true
374 }, 374 },
375 defaultItem() { 375 defaultItem() {
376 - return { productId: '', productName: '', industry: '', brand: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '', status: '', quantity: '', unitPrice: '', amountExcludingTax: 0, totalAmount: 0, deliveryDate: '', sampleOrder: '' } 376 + return { productId: '', productName: '', industry: '', brand: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '', status: '', quantity: '', unitPrice: '', amountExcludingTax: 0, totalAmount: 0, deliveryDate: '', sampleOrder: false }
377 }, 377 },
378 onNonNegativeInput(idx, field) { 378 onNonNegativeInput(idx, field) {
379 const it = this.items[idx] 379 const it = this.items[idx]
@@ -255,20 +255,20 @@ export default { @@ -255,20 +255,20 @@ export default {
255 handler(v) { 255 handler(v) {
256 // const arr = Array.isArray(v) ? v : [] 256 // const arr = Array.isArray(v) ? v : []
257 // this.items = arr.map(x => ({ ...this.defaultItem(), ...x, collapsed: true })) 257 // this.items = arr.map(x => ({ ...this.defaultItem(), ...x, collapsed: true }))
258 - this.items = v.map(x => ({ ...this.defaultItem(), ...x, collapsed: true })) 258 + this.items = v.map(x => ({ ...this.defaultItem(), ...x, sampleOrder: !!x.sampleOrder, collapsed: true }))
259 console.log('v', v) 259 console.log('v', v)
260 }, 260 },
261 deep: true 261 deep: true
262 } 262 }
263 }, 263 },
264 created() { 264 created() {
265 - const init = Array.isArray(this.list) && this.list.length > 0 ? this.list.map(v => ({ ...this.defaultItem(), ...v, collapsed: true })) : [{ ...this.defaultItem(), collapsed: false }] 265 + const init = Array.isArray(this.list) && this.list.length > 0 ? this.list.map(v => ({ ...this.defaultItem(), ...v, sampleOrder: !!v.sampleOrder, collapsed: true })) : [{ ...this.defaultItem(), collapsed: false }]
266 this.items = init 266 this.items = init
267 this.recalculateAll() 267 this.recalculateAll()
268 }, 268 },
269 methods: { 269 methods: {
270 defaultItem() { 270 defaultItem() {
271 - return { productId: '', productName: '', industry: '', brand: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '', status: '', quantity: '', unitPrice: '', amountExcludingTax: 0, totalAmount: 0, deliveryDate: '', sampleOrder: '' } 271 + return { productId: '', productName: '', industry: '', brand: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '', status: '', quantity: '', unitPrice: '', amountExcludingTax: 0, totalAmount: 0, deliveryDate: '', sampleOrder: false }
272 }, 272 },
273 onNonNegativeInput(idx, field) { 273 onNonNegativeInput(idx, field) {
274 const it = this.items[idx] 274 const it = this.items[idx]