linweizeng 3 ani în urmă
părinte
comite
2e650e3a97

+ 1 - 1
pages/fileView/reportList.vue

@@ -24,7 +24,7 @@
 						<u-button type="warning" size="mini" @click="goto(item.id_,'2')" style="margin-right: 10rpx;"
 							v-if="item.zhuang_tai_ == '已完成'">查看报告</u-button>
 						<u-button type="primary" size="mini"
-							v-if="(item.zhuang_tai_ == '已完成') || (item.shi_fou_guo_shen_ == '已编制' && item.EXT_ == 'docx')"
+							v-if="(item.zhuang_tai_ == '已完成') || (item.shi_fou_guo_shen_ == '已编制')"
 							@click="geDownload(item.bao_gao_pdf_,item.FILE_NAME_, item.EXT_)">
 							下载报告</u-button>
 					</view>

+ 4 - 3
pages/jiance/list.vue

@@ -55,7 +55,8 @@
 					</view>
 					<!-- v-if="item.zhuang_tai_ && (item.zhuang_tai_ == '待运营中心审核' || item.zhuang_tai_ == '待检测中心审核' || item.zhuang_tai_ == '待财务审核' || item.zhuang_tai_ == '待样品接收')" -->
 					<view class="btnList">
-						<u-button class="u-m-r-15 btn-back-color" type="success" size="mini" @click="goto(item.id_)"
+						<u-button class="u-m-r-15 btn-back-color" type="success" size="mini"
+							@click="goto(item.id_,item.wei_tuo_bian_hao_)"
 							v-if="item.wei_tuo_zhuang_ta && (item.wei_tuo_zhuang_ta == '待审核' ||item.wei_tuo_zhuang_ta == '已编制' || item.wei_tuo_zhuang_ta == '待财务审核' || item.wei_tuo_zhuang_ta == '待签订' || item.wei_tuo_zhuang_ta == '待样品接收')">
 							样品修改</u-button>
 						<u-button type="success" size="mini" class="m-r-15" @click="getTag(item.id_)">样品标签</u-button>
@@ -193,9 +194,9 @@
 			 * @param {Object} id
 			 * 修改样品跳转
 			 */
-			goto(id) {
+			goto(id, weiTuoBianHao) {
 				uni.navigateTo({ // 跳转页面
-					url: '/pages/jiance/list/specimen?id=' + id
+					url: `/pages/jiance/list/specimen?id=${id}&weiTuoBianHao=${weiTuoBianHao}`
 				})
 			},
 			goBaogao(option) {

+ 44 - 0
pages/jiance/list/js/specimenBox.js

@@ -0,0 +1,44 @@
+export default {
+	//时间
+	time(index) {
+		var nowDate = new Date((new Date).getTime() + 8 * 60 * 60 * 1000)
+		var time = nowDate.toJSON().split('T').join(' ').substr(0, index)
+		return time
+	},
+	getLHBata(form, parentForm, show1, show2, show3, show4) {
+		// console.log(form, parentForm)
+		let formLhypbIndex = form.lhypb.findIndex(item => item.yangPinBianHao == parentForm.yang_pin_bian_hao)
+		let formLhypb = form.lhypb[formLhypbIndex]
+		// formLhypb
+		formLhypb.yangPinMingCheng = parentForm.yang_pin_ming_che
+		formLhypb.xingBie = parentForm.xing_bie_
+		formLhypb.xingMing = parentForm.xing_ming_
+		formLhypb.nianLing = parentForm.nian_ling_
+		formLhypb.songJianPiHao = parentForm.song_jian_pi_hao_
+		formLhypb.yangPinZhuangTai = parentForm.yang_pin_zhuang_t
+		formLhypb.songJianShiJian = parentForm.song_jian_shi_jia
+		formLhypb.beiZhu1 = parentForm.bei_zhu_1_
+		formLhypb.yangPinLeiXing = parentForm.yang_pin_lei_xing
+		formLhypb.yangBenYunShuTiao = parentForm.yang_ben_yun_shu_
+		formLhypb.shuLiang = parseInt(parentForm.shu_liang_ || 0)
+		formLhypb.yangPinGuiGe = parentForm.yang_pin_gui_ge_
+		formLhypb.yangPinLeiXingEr = parentForm.yang_pin_lei_er_
+		formLhypb.yangPinYunShuTiao = parentForm.yang_pin_yun_shu_
+		formLhypb.yangPinGuiGeEr = parentForm.yang_pin_gui_ge_e
+		formLhypb.shuLiangEr = parseInt(parentForm.shu_liang_er_ || 0)
+		formLhypb.yangPinLeiXingSan = parentForm.yang_pin_gui_ge_s
+		formLhypb.shuLiangSan = parseInt(parentForm.shu_liang_san_ || 0)
+		formLhypb.yangPinYunShuSan = parentForm.yang_pin_yun_san
+		formLhypb.yangPinLeiXingSan = parentForm.yang_pin_lei_san_
+		formLhypb.yangPinGuiGeSi = parentForm.yang_pin_gui_si_
+		formLhypb.shuLiangSi = parseInt(parentForm.shu_liang_si_ || 0)
+		formLhypb.yangPinYunShuSi = parentForm.yang_pin_yun_si_
+		formLhypb.yangPinLeiXingSi = parentForm.yang_pin_lei_si_
+		formLhypb.showBoolean1 = show1
+		formLhypb.showBoolean2 = show2
+		formLhypb.showBoolean3 = show3
+		formLhypb.showBoolean4 = show4
+		form.lhypb[formLhypbIndex] = formLhypb
+		return form
+	}
+}

+ 55 - 10
pages/jiance/list/specimen.vue

@@ -236,11 +236,14 @@
 		USER_INFO
 	} from "@/common/util/constants"
 	import order from '../order/test.json'
+	import specimenBox from './js/specimenBox.js'
+	import meth from '../order/meth'
 	export default {
 		data() {
 			return {
 				userid: '',
 				id: '',
+				weiTuoBianHao: '',
 				form: {
 					yang_pin_ming_che: '',
 					yang_pin_bian_hao: '',
@@ -305,7 +308,8 @@
 				jianCeListShow: false,
 				content: ``,
 				meassageShow: false,
-				title: ''
+				title: '',
+				content: null
 			}
 		},
 		onLoad(option) {
@@ -317,6 +321,10 @@
 				this.id = option.id
 				this.getDe(option.id)
 			}
+			if (option.weiTuoBianHao) {
+				this.weiTuoBianHao = option.weiTuoBianHao
+				this.getLH(option.weiTuoBianHao)
+			}
 			this.getYpbzggb()
 			this.getYplxb()
 		},
@@ -358,9 +366,7 @@
 			//样品详情
 			getDe(id) {
 				let sql = `select  * from  t_lhypb  where id_ = '${id}'`
-
 				let requestData = this.$sig(sql)
-
 				this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
 					if (res.data.state == 200) {
 						let result = res.data.variables.data[0]
@@ -420,6 +426,20 @@
 					}
 				})
 			},
+			getLH(weiTuoBianHao) {
+				let sql =
+					`select * from t_mjsjdzcb where wei_tuo_dan_hao_ = '${weiTuoBianHao}' order by create_time_ desc`
+				let requestData = this.$sig(sql)
+				this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
+					if (res.data.state == 200) {
+						const datas = res.data.variables.data
+						if (datas.length > 0) {
+							let result = datas[0]
+							this.content = JSON.parse(result.bao_cun_nei_rong_)
+						}
+					}
+				})
+			},
 			//查询检测项目
 			getJiangCeDe(id) {
 				let sql = `select * from t_mjjcnlfw where FIND_IN_SET(id_,'${id}')`
@@ -473,10 +493,8 @@
 			},
 			//修改样品
 			getSave() {
-				var nowDate = new Date((new Date).getTime() + 8 * 60 * 60 * 1000)
-				var time = nowDate.toJSON().split('T').join(' ').substr(0, 19)
 				this.form.update_by_ = this.userid
-				this.form.update_time_ = time
+				this.form.update_time_ = meth.time(19)
 				this.form.yang_pin_zong_shu = parseInt(this.form.shu_liang_si_) + parseInt(this.form.shu_liang_san_) +
 					parseInt(this.form.shu_liang_er_) + parseInt(this.form.shu_liang_)
 
@@ -492,7 +510,11 @@
 				if (this.form.shu_liang_si_ == 0) {
 					this.form.shu_liang_si_ = ''
 				}
-
+				let lHData = null
+				if (this.weiTuoBianHao && this.content) {
+					lHData = specimenBox.getLHBata(this.content, this.form, this.showBoolean1, this.showBoolean2, this
+						.showBoolean3, this.showBoolean4)
+				}
 				let pp = {
 					paramWhere: [{
 						id_: this.id
@@ -504,11 +526,13 @@
 
 				this.$http.post("ibps/business/v3/sys/universal/updateDatasContextTable", data).then(res => {
 					if (res.data.state == 200) {
+						if (this.weiTuoBianHao && lHData) {
+							this.getLiuHen(lHData)
+						}
 						uni.navigateBack({
 							delta: 1
 						})
 						this.$tip.success('提交成功!')
-
 					} else {
 						uni.showToast({
 							title: '提交失败',
@@ -517,7 +541,29 @@
 						})
 					}
 				});
-
+			},
+			//数据留痕
+			getLiuHen(form) {
+				let dataContent = JSON.stringify(form)
+				let list = []
+				let obj = {
+					wei_tuo_dan_hao_: this.weiTuoBianHao,
+					bao_cun_nei_rong_: dataContent,
+					dui_ying_shu_ju_b: 't_lhwtblh',
+					bao_cun_biao_ti_: '委托单留痕,样品修改',
+					zhuang_tai_: '留痕',
+					bian_zhi_shi_jian: meth.time(19),
+					bian_zhi_ren_: this.userid
+				}
+				list.push(obj)
+				const params2 = {
+					tableName: 't_mjsjdzcb',
+					paramWhere: list
+				}
+				let data = this.$sig(params2)
+				this.$http.post("ibps/business/v3/sys/universal/addDataContextTable", data).then(res => {
+					if (res.data.state == 200) {}
+				});
 			},
 
 			sheetClick(type) {
@@ -525,7 +571,6 @@
 				if (type == 'state') {
 					this.list = this.sampleStateList
 				}
-
 				//1
 				if (type.includes('yangpinType')) {
 					this.list = this.sampleTypeList

+ 1 - 3
pages/jiance/order/lhypbMessage.vue

@@ -124,8 +124,7 @@
 					</view>
 
 					<view v-else>
-						<view v-for="(it, x) in form.jianCeList" :key="x" v-if="it.checked"
-							@click="getJianXiangData(it)">
+						<view v-for="(it, x) in form.jianCeList" :key="x" v-if="it.checked" @click="getSty(it)">
 							<view class="jiancexiangm">
 								<view>
 									{{it.xiang_mu_bian_hao || ''}}-{{it.jian_ce_xiang_mu_ || ''}}
@@ -338,7 +337,6 @@
 					</block>
 				</view>
 
-
 				<u-form-item label="项目名称" prop="xiangMuMingCheng" v-if="form.mingChengShow">
 					<u-input placeholder="请输入项目名称" v-model="form.xiangMuMingCheng"
 						:disabled="type == 'detail'?true :false" />

+ 0 - 1
pages/jiance/order/message.vue

@@ -33,7 +33,6 @@
 			</u-col>
 			<u-col span="8">
 				<view class="right">
-
 				</view>
 			</u-col>
 		</u-row>

+ 0 - 1
pages/jiance/order/meth.js

@@ -144,7 +144,6 @@ export default {
 				showBoolean4: false,
 				mingChengShow: false,
 
-
 				taoCanList: tCList,
 				taoCanXiangMuList: tcXmlist,
 				taoCanZiBiaoId: item.tao_can_zi_biao_i,